home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / CIncludes / ENET.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-29  |  2.5 KB  |  102 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4. Created: Thursday, September 12, 1991 at 2:56 PM
  5.  ENET.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.   Copyright Apple Computer, Inc. 1990-1991
  10.   All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14.  
  15. #ifndef __ENET__
  16. #define __ENET__
  17.  
  18. #ifndef __TYPES__
  19. #include <Types.h>
  20. #endif
  21.  
  22. #ifndef __OSUTILS__
  23. #include <OSUtils.h>
  24. #endif
  25.  
  26.  
  27. enum {
  28.  
  29.  ENetSetGeneral = 253,        /*Set "general" mode*/
  30.  ENetGetInfo = 252,            /*Get info*/
  31.  ENetRdCancel = 251,        /*Cancel read*/
  32.  ENetRead = 250,            /*Read*/
  33.  ENetWrite = 249,            /*Write*/
  34.  ENetDetachPH = 248,        /*Detach protocol handler*/
  35.  ENetAttachPH = 247,        /*Attach protocol handler*/
  36.  ENetAddMulti = 246,        /*Add a multicast address*/
  37.  ENetDelMulti = 245,        /*Delete a multicast address*/
  38.  
  39.  eLenErr = -92,                /*Length error ddpLenErr*/
  40.  eMultiErr = -91            /*Multicast address error ddpSktErr*/
  41.  
  42.  
  43. #define EAddrRType 'eadr'    /*Alternate address resource type*/
  44. };
  45.  
  46. #define EParamHeader \
  47.  QElem *qLink;                /*General EParams*/\
  48.  short qType;                /*queue type*/\
  49.  short ioTrap;                /*routine trap*/\
  50.  Ptr ioCmdAddr;                /*routine address*/\
  51.  ProcPtr ioCompletion;        /*completion routine*/\
  52.  OSErr ioResult;            /*result code*/\
  53.  StringPtr ioNamePtr;        /*->filename*/\
  54.  short ioVRefNum;            /*volume reference or drive number*/\
  55.  short ioRefNum;            /*driver reference number*/\
  56.  short csCode;                /*Call command code*/
  57.  
  58.  
  59. struct EParamMisc1 {
  60.  EParamHeader                 /*General EParams*/
  61.  short eProtType;            /*Ethernet protocol type*/
  62.  Ptr ePointer;
  63.  short eBuffSize;            /*buffer size*/
  64.  short eDataSize;            /*number of bytes read*/
  65. };
  66.  
  67. typedef struct EParamMisc1 EParamMisc1;
  68.  
  69. struct EParamMisc2 {
  70.  EParamMisc1 EParms1;
  71.  char eMultiAddr[6];        /*Multicast Address*/
  72. };
  73.  
  74. typedef struct EParamMisc2 EParamMisc2;
  75.  
  76. union EParamBlock {
  77.  EParamMisc1 EParms1;
  78.  EParamMisc2 EParms2;
  79. };
  80.  
  81. typedef union EParamBlock EParamBlock;
  82. typedef EParamBlock *EParamBlkPtr;
  83.  
  84.  
  85. #ifdef __cplusplus
  86. extern "C" {
  87. #endif
  88. pascal OSErr EWrite(EParamBlkPtr thePBptr,Boolean async); 
  89. pascal OSErr EAttachPH(EParamBlkPtr thePBptr,Boolean async); 
  90. pascal OSErr EDetachPH(EParamBlkPtr thePBptr,Boolean async); 
  91. pascal OSErr ERead(EParamBlkPtr thePBptr,Boolean async); 
  92. pascal OSErr ERdCancel(EParamBlkPtr thePBptr,Boolean async); 
  93. pascal OSErr EGetInfo(EParamBlkPtr thePBptr,Boolean async); 
  94. pascal OSErr ESetGeneral(EParamBlkPtr thePBptr,Boolean async); 
  95. pascal OSErr EAddMulti(EParamBlkPtr thePBptr,Boolean async); 
  96. pascal OSErr EDelMulti(EParamBlkPtr thePBptr,Boolean async); 
  97. #ifdef __cplusplus
  98. }
  99. #endif
  100.  
  101. #endif
  102.